package com.group3.merchant.validator.impl;

import java.util.ArrayList;
import java.util.List;

import com.group3.merchant.validator.IValidator;

public class PasswordValidator implements IValidator {

	private final String NOT_NULL_MSG="PASSWORD CANNOT BE EMPTY";
	private final String  NO_SHORTER_THAN="PASSWORD IS SHORTER THAN 6 "; 
	@Override
	public List<String> validate(String s) {
		List<String> errMsg=new ArrayList<String>();
		if("".equals(s)){
			errMsg.add(NOT_NULL_MSG);
		}else if(s.length()<6){
			errMsg.add(NO_SHORTER_THAN);
		}
		return errMsg;
	}

}
